-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CVE Download Updates #3722
CVE Download Updates #3722
Conversation
jeremylong
commented
Oct 11, 2021
- Make the CVE start year configurable.
- Add NVD CVE cache so if some downloads work but the update ultimate fails - re-running the update will use the cached data.
- Add 3 attempts to download JSON files from the NVD with a wait between each attempt.
This change plus the wait timeout should resolve #3710. |
@@ -1267,6 +1273,7 @@ private ExceptionCollection collectDependencyManagementDependencies(Engine engin | |||
* @return a collection of exceptions that may have occurred while resolving | |||
* and scanning the dependencies | |||
*/ | |||
//CSOFF: OperatorWrap | |||
private ExceptionCollection collectMavenDependencies(Engine engine, MavenProject project, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reporter: Checkstyle
Rule: com.puppycrawl.tools.checkstyle.checks.sizes.MethodLengthCheck
Severity: ERROR
File: maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java L1277
Method length is 171 lines (max allowed is 160).
} | ||
final File nvdFile = new File(cache, filename); | ||
FileUtils.copyFile(file, nvdFile); | ||
nvdFile.setLastModified(Instant.now().toEpochMilli()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reporter: Spotbugs
Rule: RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
Severity: INFO
File: core/src/main/java/org/owasp/dependencycheck/data/update/nvd/NvdCache.java L103
Source: org.owasp.dependencycheck.data.update.nvd.NvdCache
Method ignores exceptional return value <p> This method returns a value that is not checked. The return value should be checked since it can indicate an unusual or unexpected function execution. For example, the <code>File.delete()</code> method returns false if the file could not be successfully deleted (rather than throwing an Exception). If you don't check the result, you won't notice if the method invocation signals unexpected behavior by returning an atypical return value. </p>